/* 全局样式 */
:root {
    --primary-color: #0a84ff;
    --secondary-color: #5e5ce6;
    --accent-color: #00c7be;
    --dark-color: #121212;
    --light-color: #f5f5f7;
    --success-color: #34c759;
    --warning-color: #ff9500;
    --danger-color: #ff3b30;
    --text-color: #333;
    --text-light: #999;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(30, 30, 30, 0.7);
    --backdrop-filter: blur(10px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-color);
    color: var(--light-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 20% 35%, rgba(10, 132, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 44%, rgba(94, 92, 230, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 46% 52%, rgba(0, 199, 190, 0.15) 0%, transparent 50%);
    background-attachment: fixed;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(10, 132, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(10, 132, 255, 0.8); }
    100% { box-shadow: 0 0 5px rgba(10, 132, 255, 0.5); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 登录和注册页面样式 */
.auth-container {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-filter);
    -webkit-backdrop-filter: var(--backdrop-filter);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(10, 132, 255, 0.1),
        rgba(94, 92, 230, 0.1),
        rgba(0, 199, 190, 0.1)
    );
    transform: rotate(30deg);
    z-index: -1;
    pointer-events: none;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: pulse 3s infinite ease-in-out;
}

.auth-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--light-color);
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.3);
}

.form-control::placeholder {
    color: var(--text-light);
}

.btn {
    display: inline-block;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(10, 132, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.btn-primary:hover::after {
    transform: translateX(100%);
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out;
}

.alert-success {
    background-color: rgba(52, 199, 89, 0.2);
    border: 1px solid rgba(52, 199, 89, 0.3);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: var(--danger-color);
}

/* 装饰元素 */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: float 6s infinite ease-in-out;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    bottom: 15%;
    left: 20%;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, var(--warning-color) 0%, transparent 70%);
    bottom: 20%;
    right: 10%;
    animation-delay: 3s;
}

/* 仪表盘样式 */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-filter);
    -webkit-backdrop-filter: var(--backdrop-filter);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    transition: all 0.3s ease;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.sidebar-header {
    padding: 0 20px;
    margin-bottom: 30px;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--light-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-color);
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    transition: all 0.3s ease;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-title h1 {
    font-size: 2rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.user-profile {
    display: flex;
    align-items: center;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.user-info span {
    display: block;
}

.user-info .username {
    font-weight: 600;
}

.user-info .role {
    font-size: 0.8rem;
    color: var(--text-light);
}

.card {
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-filter);
    -webkit-backdrop-filter: var(--backdrop-filter);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.5s ease-out;
}

.card-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.card-header h2 {
    font-size: 1.5rem;
    color: var(--light-color);
}

.profile-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.profile-image {
    text-align: center;
}

.profile-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    padding: 3px;
    margin-bottom: 15px;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
        overflow: hidden;
    }
    
    .sidebar-header h2, .sidebar-menu a span {
        display: none;
    }
    
    .sidebar-menu a i {
        margin-right: 0;
        font-size: 1.2rem;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .profile-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .auth-card {
        padding: 30px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-profile {
        margin-top: 15px;
    }
    
    .profile-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 20px;
    }
    
    .sidebar {
        width: 0;
        opacity: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* 主页和文档页面样式 */
.main-header {
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-filter);
    -webkit-backdrop-filter: var(--backdrop-filter);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header h1 {
    margin: 0;
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-header nav a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

.main-header nav a:hover, .main-header nav a.active {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.welcome-section {
    text-align: center;
    padding: 60px 0;
    animation: fadeIn 0.8s ease-out;
}

.welcome-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.welcome-section p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.documents-section {
    padding: 30px 0 60px;
}

.documents-section h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--light-color);
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    animation: fadeIn 0.8s ease-out;
}

.document-card {
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-filter);
    -webkit-backdrop-filter: var(--backdrop-filter);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.document-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--light-color);
}

.document-card .document-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.document-card p {
    color: var(--light-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.document-card .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.no-documents {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    color: var(--text-light);
}

.document-detail {
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-filter);
    -webkit-backdrop-filter: var(--backdrop-filter);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.8s ease-out;
}

.document-detail .document-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.document-detail h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--light-color);
}

.document-detail .document-meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

.document-detail .document-content {
    color: var(--light-color);
    line-height: 1.8;
    margin-bottom: 30px;
}

.document-detail .document-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.main-footer {
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-filter);
    -webkit-backdrop-filter: var(--backdrop-filter);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    color: var(--text-light);
    margin-top: 50px;
} 